{% extends 'base.html' %}
{% load static %}
{% block title %}图片压缩{% endblock %}
{% block main %}
    <div class="tool_body">
        <div class="tool_div" >
            <form action="/tool/" method="post" enctype="multipart/form-data" class="upload_files">
                {% csrf_token %}
                <div class="tool_main">
                    <p><input type="file" name="file" multiple ></p>
                <p>尺寸大小：<input type="text" name="width" value="50"></p>
                <p><input type="submit" value="提交"></p>
                <input type="radio" name="equipment" value="True" checked>手机
                <input type="radio" name="equipment" value="False">电脑
                <div>
                    手机目前只支持单个文件下载 <br>
                    电脑为下载文件夹
                </div>
                <div>30px:<img src="{% static "img/haimeng.jpg" %}" alt="" style="width: 30px; height: 30px;"></div>
                <div>40px:<img src="{% static "img/haimeng.jpg" %}" alt="" style="width: 40px; height: 40px;"></div>
                <div>50px:<img src="{% static "img/haimeng.jpg" %}" alt="" style="width: 50px; height: 50px;"></div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}

{% block htmlcss %}
    <style>
        form{
            align-content: center;
        }
        .tool_body{
            display: flex;
            justify-content: center; /*在容器中央对齐弹性项目*/
            align-items: center;
            width: 100%;
            min-height: 100vh;
            background: url({% static "img/wtw2.jpg" %}) no-repeat 10px 10px;
            background-repeat: no-repeat;
            background-position: top;
            background-size: cover;
            overflow: hidden;
            text-align: center;
        }
        .tool_main{
            background-color: rgba(0, 0, 0,.2);
            width: 800px;
            height: 600px;
            align-content: center;
            padding: 50px;
        }
        .tool_main>div{
            height: 60px;
        }
    </style>

{% endblock %}